Skip to content

Conversation

@dimitre
Copy link
Member

@dimitre dimitre commented Apr 19, 2025

No description provided.

@dimitre dimitre marked this pull request as draft April 19, 2025 17:42
@dimitre
Copy link
Member Author

dimitre commented Apr 20, 2025

I'm loving to look at the errors here:

../../../libs/openFrameworks/graphics/ofTrueTypeFont.cpp:1021:3: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'unsigned short' in initializer list [-Wc++11-narrowing]
 1021 |                 firstIndex + 1U,

ofIndexType is an alias to TESSIndex. does it need to be?
TESSIndex vary from platform to platform? Ins't unsigned short is too short to represent indices?
What about this was fixed std::size_t for all platforms?

@dimitre dimitre marked this pull request as ready for review April 20, 2025 12:44
@dimitre dimitre marked this pull request as draft April 20, 2025 12:57
@ofTheo
Copy link
Member

ofTheo commented Apr 21, 2025

@dimitre there is definitely a historical reason for ofIndexType being TESSIndex - something with max buffer sizes on memory constrained devices?
I can't remember 100%, but I wouldn't change it unless there is bug that it solves.

@dimitre dimitre marked this pull request as ready for review April 21, 2025 21:53
dimitre added a commit to dimitre/openFrameworks that referenced this pull request Nov 17, 2025
@ofTheo
Copy link
Member

ofTheo commented Jan 9, 2026

@dimitre def feel free to merge.
Curious what the reason behind this was, did you notice a big speed up for font loading?

@dimitre
Copy link
Member Author

dimitre commented Jan 17, 2026

the idea at the time was to optimize tiny things on the core, like addVertices to resize memory allocation once.
Performance wise never tested, I suppose it is equal or better, not worse.
Now I don't think OF even should deal directly with typography, there are much better tools out there to do complicated things like glyph positioning.

@dimitre dimitre merged commit 8743f7f into openframeworks:master Jan 17, 2026
18 checks passed
@dimitre dimitre deleted the tt branch January 17, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants